package com.faneui.transfer.gateway.model;

import io.swagger.annotations.ApiModelProperty;

public class OutputBean {
	@ApiModelProperty(value = "描述信息", required = true)
	protected String msg;

	@ApiModelProperty(value = "返回码", required = true)
	protected int code;

	@ApiModelProperty(value = "成功与否", required = true)
	protected boolean success;

	@ApiModelProperty(value = "时间戳，服务器时间", required = true)
	protected long timestamp = System.currentTimeMillis();

	public OutputBean(int code, String msg) {
		this.code = code;
		this.msg = msg;
		if (code == 0) {
			this.success = true;
		}
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public boolean getSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	@Override
	public String toString() {
		return "OutputBean [msg=" + msg + ", code=" + code + ", success=" + success + ", timestamp=" + timestamp + "]";
	}
}
